<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-2"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-3"></span><span class="hs-comment">-- Module      :  Distribution.GetOpt</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- Copyright   :  (c) Sven Panne 2002-2005</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- License     :  BSD-style (see the file libraries/base/LICENSE)</span><span>
</span><span id="line-6"></span><span class="hs-comment">--</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- This is a fork of &quot;System.Console.GetOpt&quot; with the following changes:</span><span>
</span><span id="line-11"></span><span class="hs-comment">--</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- * Treat &quot;cabal --flag command&quot; as &quot;cabal command --flag&quot; e.g.</span><span>
</span><span id="line-13"></span><span class="hs-comment">--   &quot;cabal -v configure&quot; to mean &quot;cabal configure -v&quot; For flags that are</span><span>
</span><span id="line-14"></span><span class="hs-comment">--   not recognised as global flags, pass them on to the sub-command. See</span><span>
</span><span id="line-15"></span><span class="hs-comment">--   the difference in 'shortOpt'.</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- * Line wrapping in the 'usageInfo' output, plus a more compact</span><span>
</span><span id="line-18"></span><span class="hs-comment">--   rendering of short options, and slightly less padding.</span><span>
</span><span id="line-19"></span><span class="hs-comment">--</span><span>
</span><span id="line-20"></span><span class="hs-comment">-- If you want to take on the challenge of merging this with the GetOpt</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- from the base package then go for it!</span><span>
</span><span id="line-22"></span><span class="hs-comment">--</span><span>
</span><span id="line-23"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.GetOpt</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-24"></span><span>   </span><span class="annot"><span class="hs-comment">-- * GetOpt</span></span><span>
</span><span id="line-25"></span><span>   </span><span class="annot"><a href="Distribution.GetOpt.html#getOpt"><span class="hs-identifier">getOpt</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.GetOpt.html#getOpt%27"><span class="hs-identifier">getOpt'</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>   </span><span class="annot"><a href="Distribution.GetOpt.html#usageInfo"><span class="hs-identifier">usageInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>   </span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ArgOrder"><span class="hs-identifier">ArgOrder</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>   </span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#OptDescr"><span class="hs-identifier">OptDescr</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>   </span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ArgDescr"><span class="hs-identifier">ArgDescr</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span>   </span><span class="annot"><span class="hs-comment">-- * Example</span></span><span>
</span><span id="line-32"></span><span>   </span><span class="annot"><span class="hs-comment">-- | See &quot;System.Console.GetOpt&quot; for examples</span></span><span>
</span><span id="line-33"></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#"><span class="hs-identifier">System.Console.GetOpt</span></a></span><span>
</span><span id="line-38"></span><span>         </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ArgOrder"><span class="hs-identifier">ArgOrder</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#OptDescr"><span class="hs-identifier">OptDescr</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ArgDescr"><span class="hs-identifier">ArgDescr</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span class="hs-keyword">data</span><span> </span><span id="OptKind"><span class="annot"><a href="Distribution.GetOpt.html#OptKind"><span class="hs-identifier hs-var">OptKind</span></a></span></span><span> </span><span id="local-6989586621679621675"><span class="annot"><a href="#local-6989586621679621675"><span class="hs-identifier hs-type">a</span></a></span></span><span>                </span><span class="hs-comment">-- kind of cmd line arg (internal use only):</span><span>
</span><span id="line-41"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span id="Opt"><span class="annot"><a href="Distribution.GetOpt.html#Opt"><span class="hs-identifier hs-var">Opt</span></a></span></span><span>       </span><span class="annot"><a href="#local-6989586621679621675"><span class="hs-identifier hs-type">a</span></a></span><span>                </span><span class="hs-comment">--    an option</span><span>
</span><span id="line-42"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="UnreqOpt"><span class="annot"><a href="Distribution.GetOpt.html#UnreqOpt"><span class="hs-identifier hs-var">UnreqOpt</span></a></span></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>           </span><span class="hs-comment">--    an un-recognized option</span><span>
</span><span id="line-43"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="NonOpt"><span class="annot"><a href="Distribution.GetOpt.html#NonOpt"><span class="hs-identifier hs-var">NonOpt</span></a></span></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>           </span><span class="hs-comment">--    a non-option</span><span>
</span><span id="line-44"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="EndOfOpts"><span class="annot"><a href="Distribution.GetOpt.html#EndOfOpts"><span class="hs-identifier hs-var">EndOfOpts</span></a></span></span><span>                  </span><span class="hs-comment">--    end-of-options marker (i.e. &quot;--&quot;)</span><span>
</span><span id="line-45"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="OptErr"><span class="annot"><a href="Distribution.GetOpt.html#OptErr"><span class="hs-identifier hs-var">OptErr</span></a></span></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>           </span><span class="hs-comment">--    something went wrong...</span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-comment">-- | Return a string describing the usage of a command, derived from</span><span>
</span><span id="line-48"></span><span class="hs-comment">-- the header (first argument) and the options described by the</span><span>
</span><span id="line-49"></span><span class="hs-comment">-- second argument.</span><span>
</span><span id="line-50"></span><span id="local-6989586621679621716"><span class="annot"><a href="Distribution.GetOpt.html#usageInfo"><span class="hs-identifier hs-type">usageInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>                    </span><span class="hs-comment">-- header</span><span>
</span><span id="line-51"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#OptDescr"><span class="hs-identifier hs-type">OptDescr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621716"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span>              </span><span class="hs-comment">-- option descriptors</span><span>
</span><span id="line-52"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span></span><span>                    </span><span class="hs-comment">-- nicely formatted decription of options</span><span>
</span><span id="line-53"></span><span id="usageInfo"><span class="annot"><span class="annottext">usageInfo :: forall a. String -&gt; [OptDescr a] -&gt; String
</span><a href="Distribution.GetOpt.html#usageInfo"><span class="hs-identifier hs-var hs-var">usageInfo</span></a></span></span><span> </span><span id="local-6989586621679621634"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621634"><span class="hs-identifier hs-var">header</span></a></span></span><span> </span><span id="local-6989586621679621633"><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621633"><span class="hs-identifier hs-var">optDescr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; String
</span><a href="../../base/src/Data.OldList.html#unlines"><span class="hs-identifier hs-var">unlines</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621634"><span class="hs-identifier hs-var">header</span></a></span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621631"><span class="hs-identifier hs-var">table</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-54"></span><span>   </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679621629"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621629"><span class="hs-identifier hs-var">ss</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679621628"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621628"><span class="hs-identifier hs-var">ls</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679621627"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621627"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(String, String, String)] -&gt; ([String], [String], [String])
forall a b c. [(a, b, c)] -&gt; ([a], [b], [c])
</span><a href="../../base/src/GHC.List.html#unzip3"><span class="hs-identifier hs-var">unzip3</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; String
forall a. [a] -&gt; [[a]] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intercalate"><span class="hs-identifier hs-var">intercalate</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;, &quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Char -&gt; String) -&gt; String -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ArgDescr a -&gt; Char -&gt; String
forall a. ArgDescr a -&gt; Char -&gt; String
</span><a href="Distribution.GetOpt.html#fmtShort"><span class="hs-identifier hs-var">fmtShort</span></a></span><span> </span><span class="annot"><span class="annottext">ArgDescr a
</span><a href="#local-6989586621679621623"><span class="hs-identifier hs-var">ad</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621622"><span class="hs-identifier hs-var">sos</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-55"></span><span>                               </span><span class="hs-special">,</span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; String
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ArgDescr a -&gt; String -&gt; String
forall a. ArgDescr a -&gt; String -&gt; String
</span><a href="Distribution.GetOpt.html#fmtLong"><span class="hs-identifier hs-var">fmtLong</span></a></span><span>  </span><span class="annot"><span class="annottext">ArgDescr a
</span><a href="#local-6989586621679621623"><span class="hs-identifier hs-var">ad</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; [String] -&gt; [String]
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#take"><span class="hs-identifier hs-var">take</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621618"><span class="hs-identifier hs-var">los</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-56"></span><span>                               </span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621617"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-57"></span><span>                             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span> </span><span id="local-6989586621679621622"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621622"><span class="hs-identifier hs-var">sos</span></a></span></span><span> </span><span id="local-6989586621679621618"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621618"><span class="hs-identifier hs-var">los</span></a></span></span><span> </span><span id="local-6989586621679621623"><span class="annot"><span class="annottext">ArgDescr a
</span><a href="#local-6989586621679621623"><span class="hs-identifier hs-var">ad</span></a></span></span><span> </span><span id="local-6989586621679621617"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621617"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621633"><span class="hs-identifier hs-var">optDescr</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-58"></span><span>         </span><span id="local-6989586621679621612"><span class="annot"><span class="annottext">ssWidth :: Int
</span><a href="#local-6989586621679621612"><span class="hs-identifier hs-var hs-var">ssWidth</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Int] -&gt; Int
forall (t :: * -&gt; *) a. (Foldable t, Ord a) =&gt; t a -&gt; a
</span><a href="../../base/src/Data.Foldable.html#maximum"><span class="hs-identifier hs-var">maximum</span></a></span><span> </span><span class="annot"><span class="annottext">([Int] -&gt; Int) -&gt; ([String] -&gt; [Int]) -&gt; [String] -&gt; Int
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Int) -&gt; [String] -&gt; [Int]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621629"><span class="hs-identifier hs-var">ss</span></a></span><span>
</span><span id="line-59"></span><span>         </span><span id="local-6989586621679621605"><span class="annot"><span class="annottext">lsWidth :: Int
</span><a href="#local-6989586621679621605"><span class="hs-identifier hs-var hs-var">lsWidth</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Int] -&gt; Int
forall (t :: * -&gt; *) a. (Foldable t, Ord a) =&gt; t a -&gt; a
</span><a href="../../base/src/Data.Foldable.html#maximum"><span class="hs-identifier hs-var">maximum</span></a></span><span> </span><span class="annot"><span class="annottext">([Int] -&gt; Int) -&gt; ([String] -&gt; [Int]) -&gt; [String] -&gt; Int
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Int) -&gt; [String] -&gt; [Int]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621628"><span class="hs-identifier hs-var">ls</span></a></span><span>
</span><span id="line-60"></span><span>         </span><span id="local-6989586621679621597"><span class="annot"><span class="annottext">dsWidth :: Int
</span><a href="#local-6989586621679621597"><span class="hs-identifier hs-var hs-var">dsWidth</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">30</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><span class="hs-operator hs-var">`max`</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">80</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621612"><span class="hs-identifier hs-var">ssWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621605"><span class="hs-identifier hs-var">lsWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-61"></span><span>         </span><span id="local-6989586621679621631"><span class="annot"><span class="annottext">table :: [String]
</span><a href="#local-6989586621679621631"><span class="hs-identifier hs-var hs-var">table</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; String
</span><a href="#local-6989586621679621594"><span class="hs-identifier hs-var">padTo</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621612"><span class="hs-identifier hs-var">ssWidth</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621593"><span class="hs-identifier hs-var">so'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-62"></span><span>                        </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; String
</span><a href="#local-6989586621679621594"><span class="hs-identifier hs-var">padTo</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621605"><span class="hs-identifier hs-var">lsWidth</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621592"><span class="hs-identifier hs-var">lo'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-63"></span><span>                        </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621591"><span class="hs-identifier hs-var">d'</span></a></span><span>
</span><span id="line-64"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679621590"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621590"><span class="hs-identifier hs-var">so</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679621589"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621589"><span class="hs-identifier hs-var">lo</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679621588"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621588"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String] -&gt; [(String, String, String)]
forall a b c. [a] -&gt; [b] -&gt; [c] -&gt; [(a, b, c)]
</span><a href="../../base/src/GHC.List.html#zip3"><span class="hs-identifier hs-var">zip3</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621629"><span class="hs-identifier hs-var">ss</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621628"><span class="hs-identifier hs-var">ls</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621627"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-65"></span><span>                      </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679621593"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621593"><span class="hs-identifier hs-var">so'</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679621592"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621592"><span class="hs-identifier hs-var">lo'</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679621591"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621591"><span class="hs-identifier hs-var">d'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; String -&gt; String -&gt; [(String, String, String)]
</span><a href="Distribution.GetOpt.html#fmtOpt"><span class="hs-identifier hs-var">fmtOpt</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621597"><span class="hs-identifier hs-var">dsWidth</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621590"><span class="hs-identifier hs-var">so</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621589"><span class="hs-identifier hs-var">lo</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621588"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-66"></span><span>         </span><span id="local-6989586621679621594"><span class="annot"><span class="annottext">padTo :: Int -&gt; String -&gt; String
</span><a href="#local-6989586621679621594"><span class="hs-identifier hs-var hs-var">padTo</span></a></span></span><span> </span><span id="local-6989586621679621585"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621585"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679621584"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621584"><span class="hs-identifier hs-var">x</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; String
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#take"><span class="hs-identifier hs-var">take</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621585"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621584"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String
forall a. a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#repeat"><span class="hs-identifier hs-var">repeat</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span class="hs-special">)</span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span class="annot"><a href="Distribution.GetOpt.html#fmtOpt"><span class="hs-identifier hs-type">fmtOpt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-69"></span><span id="fmtOpt"><span class="annot"><span class="annottext">fmtOpt :: Int -&gt; String -&gt; String -&gt; String -&gt; [(String, String, String)]
</span><a href="Distribution.GetOpt.html#fmtOpt"><span class="hs-identifier hs-var hs-var">fmtOpt</span></a></span></span><span> </span><span id="local-6989586621679621582"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621582"><span class="hs-identifier hs-var">descrWidth</span></a></span></span><span> </span><span id="local-6989586621679621581"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621581"><span class="hs-identifier hs-var">so</span></a></span></span><span> </span><span id="local-6989586621679621580"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621580"><span class="hs-identifier hs-var">lo</span></a></span></span><span> </span><span id="local-6989586621679621579"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621579"><span class="hs-identifier hs-var">descr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-70"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; [String]
</span><a href="Distribution.GetOpt.html#wrapText"><span class="hs-identifier hs-var">wrapText</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621582"><span class="hs-identifier hs-var">descrWidth</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621579"><span class="hs-identifier hs-var">descr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-71"></span><span>     </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621581"><span class="hs-identifier hs-var">so</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621580"><span class="hs-identifier hs-var">lo</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-72"></span><span>     </span><span class="hs-special">(</span><span id="local-6989586621679621577"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621577"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679621576"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621576"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621581"><span class="hs-identifier hs-var">so</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621580"><span class="hs-identifier hs-var">lo</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621577"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(String, String, String)
-&gt; [(String, String, String)] -&gt; [(String, String, String)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621575"><span class="hs-identifier hs-var">d'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679621575"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621575"><span class="hs-identifier hs-var">d'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621576"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-73"></span><span>
</span><span id="line-74"></span><span id="local-6989586621679621705"><span class="annot"><a href="Distribution.GetOpt.html#fmtShort"><span class="hs-identifier hs-type">fmtShort</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ArgDescr"><span class="hs-identifier hs-type">ArgDescr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621705"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span></span><span>
</span><span id="line-75"></span><span id="fmtShort"><span class="annot"><span class="annottext">fmtShort :: forall a. ArgDescr a -&gt; Char -&gt; String
</span><a href="Distribution.GetOpt.html#fmtShort"><span class="hs-identifier hs-var hs-var">fmtShort</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#NoArg"><span class="hs-identifier hs-type">NoArg</span></a></span><span>  </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">)</span><span> </span><span id="local-6989586621679621573"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679621573"><span class="hs-identifier hs-var">so</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679621573"><span class="hs-identifier hs-var">so</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-76"></span><span class="annot"><a href="Distribution.GetOpt.html#fmtShort"><span class="hs-identifier hs-var">fmtShort</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ReqArg"><span class="hs-identifier hs-type">ReqArg</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; a
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679621571"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679621571"><span class="hs-identifier hs-var">so</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679621571"><span class="hs-identifier hs-var">so</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-77"></span><span class="annot"><a href="Distribution.GetOpt.html#fmtShort"><span class="hs-identifier hs-var">fmtShort</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#OptArg"><span class="hs-identifier hs-type">OptArg</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; a
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679621569"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679621569"><span class="hs-identifier hs-var">so</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679621569"><span class="hs-identifier hs-var">so</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-78"></span><span>  </span><span class="hs-comment">-- unlike upstream GetOpt we omit the arg name for short options</span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span id="local-6989586621679621701"><span class="annot"><a href="Distribution.GetOpt.html#fmtLong"><span class="hs-identifier hs-type">fmtLong</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ArgDescr"><span class="hs-identifier hs-type">ArgDescr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621701"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span></span><span>
</span><span id="line-81"></span><span id="fmtLong"><span class="annot"><span class="annottext">fmtLong :: forall a. ArgDescr a -&gt; String -&gt; String
</span><a href="Distribution.GetOpt.html#fmtLong"><span class="hs-identifier hs-var hs-var">fmtLong</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#NoArg"><span class="hs-identifier hs-type">NoArg</span></a></span><span>  </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">)</span><span> </span><span id="local-6989586621679621568"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621568"><span class="hs-identifier hs-var">lo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621568"><span class="hs-identifier hs-var">lo</span></a></span><span>
</span><span id="line-82"></span><span class="annot"><a href="Distribution.GetOpt.html#fmtLong"><span class="hs-identifier hs-var">fmtLong</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ReqArg"><span class="hs-identifier hs-type">ReqArg</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; a
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679621567"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621567"><span class="hs-identifier hs-var">ad</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679621566"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621566"><span class="hs-identifier hs-var">lo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621566"><span class="hs-identifier hs-var">lo</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621567"><span class="hs-identifier hs-var">ad</span></a></span><span>
</span><span id="line-83"></span><span class="annot"><a href="Distribution.GetOpt.html#fmtLong"><span class="hs-identifier hs-var">fmtLong</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#OptArg"><span class="hs-identifier hs-type">OptArg</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; a
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679621565"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621565"><span class="hs-identifier hs-var">ad</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679621564"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621564"><span class="hs-identifier hs-var">lo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621564"><span class="hs-identifier hs-var">lo</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;[=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621565"><span class="hs-identifier hs-var">ad</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;]&quot;</span></span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="annot"><a href="Distribution.GetOpt.html#wrapText"><span class="hs-identifier hs-type">wrapText</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-86"></span><span id="wrapText"><span class="annot"><span class="annottext">wrapText :: Int -&gt; String -&gt; [String]
</span><a href="Distribution.GetOpt.html#wrapText"><span class="hs-identifier hs-var hs-var">wrapText</span></a></span></span><span> </span><span id="local-6989586621679621563"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621563"><span class="hs-identifier hs-var">width</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([String] -&gt; String) -&gt; [[String]] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; String
</span><a href="../../base/src/Data.OldList.html#unwords"><span class="hs-identifier hs-var">unwords</span></a></span><span> </span><span class="annot"><span class="annottext">([[String]] -&gt; [String])
-&gt; (String -&gt; [[String]]) -&gt; String -&gt; [String]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; [String] -&gt; [String] -&gt; [[String]]
</span><a href="#local-6989586621679621561"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">([String] -&gt; [[String]])
-&gt; (String -&gt; [String]) -&gt; String -&gt; [[String]]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="../../base/src/Data.OldList.html#words"><span class="hs-identifier hs-var">words</span></a></span><span>
</span><span id="line-87"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="#local-6989586621679621561"><span class="hs-identifier hs-type">wrap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><span id="line-88"></span><span>        </span><span id="local-6989586621679621561"><span class="annot"><span class="annottext">wrap :: Int -&gt; [String] -&gt; [String] -&gt; [[String]]
</span><a href="#local-6989586621679621561"><span class="hs-identifier hs-var hs-var">wrap</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>   </span><span class="hs-special">[</span><span class="hs-special">]</span><span>   </span><span class="hs-special">(</span><span id="local-6989586621679621559"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621559"><span class="hs-identifier hs-var">w</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679621558"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621558"><span class="hs-identifier hs-var">ws</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-89"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621559"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621563"><span class="hs-identifier hs-var">width</span></a></span><span>
</span><span id="line-90"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [String] -&gt; [String] -&gt; [[String]]
</span><a href="#local-6989586621679621561"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621559"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621559"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621558"><span class="hs-identifier hs-var">ws</span></a></span><span>
</span><span id="line-91"></span><span>        </span><span class="annot"><a href="#local-6989586621679621561"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span id="local-6989586621679621556"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621556"><span class="hs-identifier hs-var">col</span></a></span></span><span> </span><span id="local-6989586621679621555"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621555"><span class="hs-identifier hs-var">line</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679621554"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621554"><span class="hs-identifier hs-var">w</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679621553"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621553"><span class="hs-identifier hs-var">ws</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-92"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621556"><span class="hs-identifier hs-var">col</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621554"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621563"><span class="hs-identifier hs-var">width</span></a></span><span>
</span><span id="line-93"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621555"><span class="hs-identifier hs-var">line</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [[String]] -&gt; [[String]]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; [String] -&gt; [String] -&gt; [[String]]
</span><a href="#local-6989586621679621561"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621554"><span class="hs-identifier hs-var">w</span></a></span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621553"><span class="hs-identifier hs-var">ws</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-94"></span><span>        </span><span class="annot"><a href="#local-6989586621679621561"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span id="local-6989586621679621551"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621551"><span class="hs-identifier hs-var">col</span></a></span></span><span> </span><span id="local-6989586621679621550"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621550"><span class="hs-identifier hs-var">line</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679621549"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621549"><span class="hs-identifier hs-var">w</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679621548"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621548"><span class="hs-identifier hs-var">ws</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-95"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679621543"><span class="annot"><span class="annottext">col' :: Int
</span><a href="#local-6989586621679621543"><span class="hs-identifier hs-var hs-var">col'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621551"><span class="hs-identifier hs-var">col</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621549"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-96"></span><span>             </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [String] -&gt; [String] -&gt; [[String]]
</span><a href="#local-6989586621679621561"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679621543"><span class="hs-identifier hs-var">col'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621549"><span class="hs-identifier hs-var">w</span></a></span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621550"><span class="hs-identifier hs-var">line</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621548"><span class="hs-identifier hs-var">ws</span></a></span><span>
</span><span id="line-97"></span><span>        </span><span class="annot"><a href="#local-6989586621679621561"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>   </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-98"></span><span>        </span><span class="annot"><a href="#local-6989586621679621561"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679621542"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621542"><span class="hs-identifier hs-var">line</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[String] -&gt; [String]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621542"><span class="hs-identifier hs-var">line</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span class="hs-comment">{-|
Process the command-line, and return the list of values that matched
(and those that didn\'t). The arguments are:

* The order requirements (see 'ArgOrder')

* The option descriptions (see 'OptDescr')

* The actual command line arguments (presumably got from
  'System.Environment.getArgs').

'getOpt' returns a triple consisting of the option arguments, a list
of non-options, and a list of error messages.
-}</span><span>
</span><span id="line-114"></span><span id="local-6989586621679621683"><span class="annot"><a href="Distribution.GetOpt.html#getOpt"><span class="hs-identifier hs-type">getOpt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ArgOrder"><span class="hs-identifier hs-type">ArgOrder</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621683"><span class="hs-identifier hs-type">a</span></a></span><span>                   </span><span class="hs-comment">-- non-option handling</span><span>
</span><span id="line-115"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#OptDescr"><span class="hs-identifier hs-type">OptDescr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621683"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span>                 </span><span class="hs-comment">-- option descriptors</span><span>
</span><span id="line-116"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>                     </span><span class="hs-comment">-- the command-line arguments</span><span>
</span><span id="line-117"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679621683"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span><span>      </span><span class="hs-comment">-- (options,non-options,error messages)</span><span>
</span><span id="line-118"></span><span id="getOpt"><span class="annot"><span class="annottext">getOpt :: forall a.
ArgOrder a -&gt; [OptDescr a] -&gt; [String] -&gt; ([a], [String], [String])
</span><a href="Distribution.GetOpt.html#getOpt"><span class="hs-identifier hs-var hs-var">getOpt</span></a></span></span><span> </span><span id="local-6989586621679621541"><span class="annot"><span class="annottext">ArgOrder a
</span><a href="#local-6989586621679621541"><span class="hs-identifier hs-var">ordering</span></a></span></span><span> </span><span id="local-6989586621679621540"><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621540"><span class="hs-identifier hs-var">optDescr</span></a></span></span><span> </span><span id="local-6989586621679621539"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621539"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679621538"><span class="hs-identifier hs-var">os</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621537"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621536"><span class="hs-identifier hs-var">es</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="Distribution.GetOpt.html#errUnrec"><span class="hs-identifier hs-var">errUnrec</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621534"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-119"></span><span>   </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679621538"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679621538"><span class="hs-identifier hs-var">os</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679621537"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621537"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679621534"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621534"><span class="hs-identifier hs-var">us</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679621536"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621536"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ArgOrder a
-&gt; [OptDescr a] -&gt; [String] -&gt; ([a], [String], [String], [String])
forall a.
ArgOrder a
-&gt; [OptDescr a] -&gt; [String] -&gt; ([a], [String], [String], [String])
</span><a href="Distribution.GetOpt.html#getOpt%27"><span class="hs-identifier hs-var">getOpt'</span></a></span><span> </span><span class="annot"><span class="annottext">ArgOrder a
</span><a href="#local-6989586621679621541"><span class="hs-identifier hs-var">ordering</span></a></span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621540"><span class="hs-identifier hs-var">optDescr</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621539"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span class="hs-comment">{-|
This is almost the same as 'getOpt', but returns a quadruple
consisting of the option arguments, a list of non-options, a list of
unrecognized options, and a list of error messages.
-}</span><span>
</span><span id="line-126"></span><span id="local-6989586621679621680"><span class="annot"><a href="Distribution.GetOpt.html#getOpt%27"><span class="hs-identifier hs-type">getOpt'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ArgOrder"><span class="hs-identifier hs-type">ArgOrder</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621680"><span class="hs-identifier hs-type">a</span></a></span><span>                         </span><span class="hs-comment">-- non-option handling</span><span>
</span><span id="line-127"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#OptDescr"><span class="hs-identifier hs-type">OptDescr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621680"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span>                       </span><span class="hs-comment">-- option descriptors</span><span>
</span><span id="line-128"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>                           </span><span class="hs-comment">-- the command-line arguments</span><span>
</span><span id="line-129"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679621680"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span><span> </span><span class="hs-comment">-- (options,non-options,unrecognized,error messages)</span><span>
</span><span id="line-130"></span><span id="getOpt%27"><span class="annot"><span class="annottext">getOpt' :: forall a.
ArgOrder a
-&gt; [OptDescr a] -&gt; [String] -&gt; ([a], [String], [String], [String])
</span><a href="Distribution.GetOpt.html#getOpt%27"><span class="hs-identifier hs-var hs-var">getOpt'</span></a></span></span><span> </span><span class="annot"><span class="annottext">ArgOrder a
</span><span class="hs-identifier">_</span></span><span>        </span><span class="annot"><span class="annottext">[OptDescr a]
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-special">[</span><span class="hs-special">]</span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-131"></span><span class="annot"><a href="Distribution.GetOpt.html#getOpt%27"><span class="hs-identifier hs-var">getOpt'</span></a></span><span> </span><span id="local-6989586621679621533"><span class="annot"><span class="annottext">ArgOrder a
</span><a href="#local-6989586621679621533"><span class="hs-identifier hs-var">ordering</span></a></span></span><span> </span><span id="local-6989586621679621532"><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621532"><span class="hs-identifier hs-var">optDescr</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679621531"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621531"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679621530"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621530"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OptKind a -&gt; ArgOrder a -&gt; ([a], [String], [String], [String])
</span><a href="#local-6989586621679621529"><span class="hs-identifier hs-var">procNextOpt</span></a></span><span> </span><span class="annot"><span class="annottext">OptKind a
</span><a href="#local-6989586621679621528"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="annot"><span class="annottext">ArgOrder a
</span><a href="#local-6989586621679621533"><span class="hs-identifier hs-var">ordering</span></a></span><span>
</span><span id="line-132"></span><span>   </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679621529"><span class="annot"><span class="annottext">procNextOpt :: OptKind a -&gt; ArgOrder a -&gt; ([a], [String], [String], [String])
</span><a href="#local-6989586621679621529"><span class="hs-identifier hs-var hs-var">procNextOpt</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.GetOpt.html#Opt"><span class="hs-identifier hs-type">Opt</span></a></span><span> </span><span id="local-6989586621679621527"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679621527"><span class="hs-identifier hs-var">o</span></a></span></span><span class="hs-special">)</span><span>      </span><span class="annot"><span class="annottext">ArgOrder a
</span><span class="hs-identifier">_</span></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679621527"><span class="hs-identifier hs-var">o</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679621526"><span class="hs-identifier hs-var">os</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621525"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621524"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621523"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-133"></span><span>         </span><span class="annot"><a href="#local-6989586621679621529"><span class="hs-identifier hs-var">procNextOpt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.GetOpt.html#UnreqOpt"><span class="hs-identifier hs-type">UnreqOpt</span></a></span><span> </span><span id="local-6989586621679621522"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621522"><span class="hs-identifier hs-var">u</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ArgOrder a
</span><span class="hs-identifier">_</span></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679621526"><span class="hs-identifier hs-var">os</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621525"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621522"><span class="hs-identifier hs-var">u</span></a></span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621524"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621523"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-134"></span><span>         </span><span class="annot"><a href="#local-6989586621679621529"><span class="hs-identifier hs-var">procNextOpt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.GetOpt.html#NonOpt"><span class="hs-identifier hs-type">NonOpt</span></a></span><span> </span><span id="local-6989586621679621521"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621521"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="annot"><span class="annottext">ArgOrder a
</span><a href="../../base/src/System.Console.GetOpt.html#RequireOrder"><span class="hs-identifier hs-var">RequireOrder</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621521"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621519"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-135"></span><span>         </span><span class="annot"><a href="#local-6989586621679621529"><span class="hs-identifier hs-var">procNextOpt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.GetOpt.html#NonOpt"><span class="hs-identifier hs-type">NonOpt</span></a></span><span> </span><span id="local-6989586621679621518"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621518"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="annot"><span class="annottext">ArgOrder a
</span><a href="../../base/src/System.Console.GetOpt.html#Permute"><span class="hs-identifier hs-var">Permute</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679621526"><span class="hs-identifier hs-var">os</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621518"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621525"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621524"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621523"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-136"></span><span>         </span><span class="annot"><a href="#local-6989586621679621529"><span class="hs-identifier hs-var">procNextOpt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.GetOpt.html#NonOpt"><span class="hs-identifier hs-type">NonOpt</span></a></span><span> </span><span id="local-6989586621679621516"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621516"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ReturnInOrder"><span class="hs-identifier hs-type">ReturnInOrder</span></a></span><span> </span><span id="local-6989586621679621514"><span class="annot"><span class="annottext">String -&gt; a
</span><a href="#local-6989586621679621514"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; a
</span><a href="#local-6989586621679621514"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621516"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679621526"><span class="hs-identifier hs-var">os</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621525"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621524"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621523"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-137"></span><span>         </span><span class="annot"><a href="#local-6989586621679621529"><span class="hs-identifier hs-var">procNextOpt</span></a></span><span> </span><span class="annot"><span class="annottext">OptKind a
</span><a href="Distribution.GetOpt.html#EndOfOpts"><span class="hs-identifier hs-var">EndOfOpts</span></a></span><span>    </span><span class="annot"><span class="annottext">ArgOrder a
</span><a href="../../base/src/System.Console.GetOpt.html#RequireOrder"><span class="hs-identifier hs-var">RequireOrder</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621519"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-138"></span><span>         </span><span class="annot"><a href="#local-6989586621679621529"><span class="hs-identifier hs-var">procNextOpt</span></a></span><span> </span><span class="annot"><span class="annottext">OptKind a
</span><a href="Distribution.GetOpt.html#EndOfOpts"><span class="hs-identifier hs-var">EndOfOpts</span></a></span><span>    </span><span class="annot"><span class="annottext">ArgOrder a
</span><a href="../../base/src/System.Console.GetOpt.html#Permute"><span class="hs-identifier hs-var">Permute</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621519"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-139"></span><span>         </span><span class="annot"><a href="#local-6989586621679621529"><span class="hs-identifier hs-var">procNextOpt</span></a></span><span> </span><span class="annot"><span class="annottext">OptKind a
</span><a href="Distribution.GetOpt.html#EndOfOpts"><span class="hs-identifier hs-var">EndOfOpts</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ReturnInOrder"><span class="hs-identifier hs-type">ReturnInOrder</span></a></span><span> </span><span id="local-6989586621679621513"><span class="annot"><span class="annottext">String -&gt; a
</span><a href="#local-6989586621679621513"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(String -&gt; a) -&gt; [String] -&gt; [a]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; a
</span><a href="#local-6989586621679621513"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621519"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-140"></span><span>         </span><span class="annot"><a href="#local-6989586621679621529"><span class="hs-identifier hs-var">procNextOpt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.GetOpt.html#OptErr"><span class="hs-identifier hs-type">OptErr</span></a></span><span> </span><span id="local-6989586621679621512"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621512"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="annot"><span class="annottext">ArgOrder a
</span><span class="hs-identifier">_</span></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679621526"><span class="hs-identifier hs-var">os</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621525"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621524"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621512"><span class="hs-identifier hs-var">e</span></a></span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621523"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-141"></span><span>
</span><span id="line-142"></span><span>         </span><span class="hs-special">(</span><span id="local-6989586621679621528"><span class="annot"><span class="annottext">OptKind a
</span><a href="#local-6989586621679621528"><span class="hs-identifier hs-var">opt</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679621519"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621519"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [OptDescr a] -&gt; (OptKind a, [String])
forall a.
String -&gt; [String] -&gt; [OptDescr a] -&gt; (OptKind a, [String])
</span><a href="Distribution.GetOpt.html#getNext"><span class="hs-identifier hs-var">getNext</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621531"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621530"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621532"><span class="hs-identifier hs-var">optDescr</span></a></span><span>
</span><span id="line-143"></span><span>         </span><span class="hs-special">(</span><span id="local-6989586621679621526"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679621526"><span class="hs-identifier hs-var">os</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679621525"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621525"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679621524"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621524"><span class="hs-identifier hs-var">us</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679621523"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621523"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ArgOrder a
-&gt; [OptDescr a] -&gt; [String] -&gt; ([a], [String], [String], [String])
forall a.
ArgOrder a
-&gt; [OptDescr a] -&gt; [String] -&gt; ([a], [String], [String], [String])
</span><a href="Distribution.GetOpt.html#getOpt%27"><span class="hs-identifier hs-var">getOpt'</span></a></span><span> </span><span class="annot"><span class="annottext">ArgOrder a
</span><a href="#local-6989586621679621533"><span class="hs-identifier hs-var">ordering</span></a></span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621532"><span class="hs-identifier hs-var">optDescr</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621519"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span class="hs-comment">-- take a look at the next cmd line arg and decide what to do with it</span><span>
</span><span id="line-146"></span><span id="local-6989586621679621677"><span class="annot"><a href="Distribution.GetOpt.html#getNext"><span class="hs-identifier hs-type">getNext</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#OptDescr"><span class="hs-identifier hs-type">OptDescr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621677"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.GetOpt.html#OptKind"><span class="hs-identifier hs-type">OptKind</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621677"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span><span>
</span><span id="line-147"></span><span id="getNext"><span class="annot"><span class="annottext">getNext :: forall a.
String -&gt; [String] -&gt; [OptDescr a] -&gt; (OptKind a, [String])
</span><a href="Distribution.GetOpt.html#getNext"><span class="hs-identifier hs-var hs-var">getNext</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span id="local-6989586621679621510"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621510"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OptKind a
forall a. OptKind a
</span><a href="Distribution.GetOpt.html#EndOfOpts"><span class="hs-identifier hs-var">EndOfOpts</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621510"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-148"></span><span class="annot"><a href="Distribution.GetOpt.html#getNext"><span class="hs-identifier hs-var">getNext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679621509"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621509"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679621508"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621508"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span id="local-6989586621679621507"><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621507"><span class="hs-identifier hs-var">optDescr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [OptDescr a] -&gt; (OptKind a, [String])
forall a.
String -&gt; [String] -&gt; [OptDescr a] -&gt; (OptKind a, [String])
</span><a href="Distribution.GetOpt.html#longOpt"><span class="hs-identifier hs-var">longOpt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621509"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621508"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621507"><span class="hs-identifier hs-var">optDescr</span></a></span><span>
</span><span id="line-149"></span><span class="annot"><a href="Distribution.GetOpt.html#getNext"><span class="hs-identifier hs-var">getNext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621679621505"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679621505"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679621504"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621504"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679621503"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621503"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span id="local-6989586621679621502"><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621502"><span class="hs-identifier hs-var">optDescr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; [String] -&gt; [OptDescr a] -&gt; (OptKind a, [String])
forall a.
Char -&gt; String -&gt; [String] -&gt; [OptDescr a] -&gt; (OptKind a, [String])
</span><a href="Distribution.GetOpt.html#shortOpt"><span class="hs-identifier hs-var">shortOpt</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679621505"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621504"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621503"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621502"><span class="hs-identifier hs-var">optDescr</span></a></span><span>
</span><span id="line-150"></span><span class="annot"><a href="Distribution.GetOpt.html#getNext"><span class="hs-identifier hs-var">getNext</span></a></span><span> </span><span id="local-6989586621679621500"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621500"><span class="hs-identifier hs-var">a</span></a></span></span><span>            </span><span id="local-6989586621679621499"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621499"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; OptKind a
forall a. String -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#NonOpt"><span class="hs-identifier hs-var">NonOpt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621500"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621499"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span class="hs-comment">-- handle long option</span><span>
</span><span id="line-153"></span><span id="local-6989586621679621498"><span class="annot"><a href="Distribution.GetOpt.html#longOpt"><span class="hs-identifier hs-type">longOpt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#OptDescr"><span class="hs-identifier hs-type">OptDescr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621498"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.GetOpt.html#OptKind"><span class="hs-identifier hs-type">OptKind</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621498"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span><span>
</span><span id="line-154"></span><span id="longOpt"><span class="annot"><span class="annottext">longOpt :: forall a.
String -&gt; [String] -&gt; [OptDescr a] -&gt; (OptKind a, [String])
</span><a href="Distribution.GetOpt.html#longOpt"><span class="hs-identifier hs-var hs-var">longOpt</span></a></span></span><span> </span><span id="local-6989586621679621497"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621497"><span class="hs-identifier hs-var">ls</span></a></span></span><span> </span><span id="local-6989586621679621496"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621496"><span class="hs-identifier hs-var">rs</span></a></span></span><span> </span><span id="local-6989586621679621495"><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621495"><span class="hs-identifier hs-var">optDescr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ArgDescr a] -&gt; String -&gt; [String] -&gt; (OptKind a, [String])
</span><a href="#local-6989586621679621494"><span class="hs-identifier hs-var">long</span></a></span><span> </span><span class="annot"><span class="annottext">[ArgDescr a]
</span><a href="#local-6989586621679621493"><span class="hs-identifier hs-var">ads</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621492"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621496"><span class="hs-identifier hs-var">rs</span></a></span><span>
</span><span id="line-155"></span><span>   </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679621489"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621489"><span class="hs-identifier hs-var">opt</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679621492"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621492"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; (String, String)
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/GHC.List.html#break"><span class="hs-identifier hs-var">break</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'='</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621497"><span class="hs-identifier hs-var">ls</span></a></span><span>
</span><span id="line-156"></span><span>         </span><span id="local-6989586621679621486"><span class="annot"><span class="annottext">getWith :: (String -&gt; String -&gt; Bool) -&gt; [OptDescr a]
</span><a href="#local-6989586621679621486"><span class="hs-identifier hs-var hs-var">getWith</span></a></span></span><span> </span><span id="local-6989586621679621485"><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
</span><a href="#local-6989586621679621485"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">OptDescr a
</span><a href="#local-6989586621679621484"><span class="hs-identifier hs-var">o</span></a></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679621484"><span class="annot"><span class="annottext">o :: OptDescr a
</span><a href="#local-6989586621679621484"><span class="hs-identifier hs-var">o</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679621483"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621483"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="annot"><span class="annottext">ArgDescr a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621495"><span class="hs-identifier hs-var">optDescr</span></a></span><span>
</span><span id="line-157"></span><span>                          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="../../base/src/Data.Maybe.html#isJust"><span class="hs-identifier hs-var">isJust</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(String -&gt; Bool) -&gt; [String] -&gt; Maybe String
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Maybe a
</span><a href="../../base/src/Data.Foldable.html#find"><span class="hs-identifier hs-var">find</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
</span><a href="#local-6989586621679621485"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621489"><span class="hs-identifier hs-var">opt</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621483"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-158"></span><span>         </span><span id="local-6989586621679621477"><span class="annot"><span class="annottext">exact :: [OptDescr a]
</span><a href="#local-6989586621679621477"><span class="hs-identifier hs-var hs-var">exact</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String -&gt; Bool) -&gt; [OptDescr a]
</span><a href="#local-6989586621679621486"><span class="hs-identifier hs-var">getWith</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">(==)</span></span><span>
</span><span id="line-159"></span><span>         </span><span id="local-6989586621679621474"><span class="annot"><span class="annottext">options :: [OptDescr a]
</span><a href="#local-6989586621679621474"><span class="hs-identifier hs-var hs-var">options</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">[OptDescr a] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621477"><span class="hs-identifier hs-var">exact</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String -&gt; Bool) -&gt; [OptDescr a]
</span><a href="#local-6989586621679621486"><span class="hs-identifier hs-var">getWith</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="../../base/src/Data.OldList.html#isPrefixOf"><span class="hs-identifier hs-var">isPrefixOf</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621477"><span class="hs-identifier hs-var">exact</span></a></span><span>
</span><span id="line-160"></span><span>         </span><span id="local-6989586621679621493"><span class="annot"><span class="annottext">ads :: [ArgDescr a]
</span><a href="#local-6989586621679621493"><span class="hs-identifier hs-var hs-var">ads</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">ArgDescr a
</span><a href="#local-6989586621679621471"><span class="hs-identifier hs-var">ad</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679621471"><span class="annot"><span class="annottext">ArgDescr a
</span><a href="#local-6989586621679621471"><span class="hs-identifier hs-var">ad</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621474"><span class="hs-identifier hs-var">options</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-161"></span><span>         </span><span id="local-6989586621679621470"><span class="annot"><span class="annottext">optStr :: String
</span><a href="#local-6989586621679621470"><span class="hs-identifier hs-var hs-var">optStr</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621489"><span class="hs-identifier hs-var">opt</span></a></span><span>
</span><span id="line-162"></span><span>
</span><span id="line-163"></span><span>         </span><span id="local-6989586621679621494"><span class="annot"><span class="annottext">long :: [ArgDescr a] -&gt; String -&gt; [String] -&gt; (OptKind a, [String])
</span><a href="#local-6989586621679621494"><span class="hs-identifier hs-var hs-var">long</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ArgDescr a
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">ArgDescr a
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[ArgDescr a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>      </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>        </span><span id="local-6989586621679621469"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621469"><span class="hs-identifier hs-var">rest</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[OptDescr a] -&gt; String -&gt; OptKind a
forall a. [OptDescr a] -&gt; String -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#errAmbig"><span class="hs-identifier hs-var">errAmbig</span></a></span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621474"><span class="hs-identifier hs-var">options</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621470"><span class="hs-identifier hs-var">optStr</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621469"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-164"></span><span>         </span><span class="annot"><a href="#local-6989586621679621494"><span class="hs-identifier hs-var">long</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#NoArg"><span class="hs-identifier hs-type">NoArg</span></a></span><span>  </span><span id="local-6989586621679621467"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679621467"><span class="hs-identifier hs-var">a</span></a></span></span><span>  </span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>       </span><span id="local-6989586621679621466"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621466"><span class="hs-identifier hs-var">rest</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; OptKind a
forall a. a -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#Opt"><span class="hs-identifier hs-var">Opt</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679621467"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621466"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-165"></span><span>         </span><span class="annot"><a href="#local-6989586621679621494"><span class="hs-identifier hs-var">long</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#NoArg"><span class="hs-identifier hs-type">NoArg</span></a></span><span>  </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'='</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span id="local-6989586621679621465"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621465"><span class="hs-identifier hs-var">rest</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; OptKind a
forall a. String -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#errNoArg"><span class="hs-identifier hs-var">errNoArg</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621470"><span class="hs-identifier hs-var">optStr</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621465"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-166"></span><span>         </span><span class="annot"><a href="#local-6989586621679621494"><span class="hs-identifier hs-var">long</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ReqArg"><span class="hs-identifier hs-type">ReqArg</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; a
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679621463"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621463"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>       </span><span class="hs-special">[</span><span class="hs-special">]</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String -&gt; OptKind a
forall a. String -&gt; String -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#errReq"><span class="hs-identifier hs-var">errReq</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621463"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621470"><span class="hs-identifier hs-var">optStr</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-167"></span><span>         </span><span class="annot"><a href="#local-6989586621679621494"><span class="hs-identifier hs-var">long</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ReqArg"><span class="hs-identifier hs-type">ReqArg</span></a></span><span> </span><span id="local-6989586621679621461"><span class="annot"><span class="annottext">String -&gt; a
</span><a href="#local-6989586621679621461"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>       </span><span class="hs-special">(</span><span id="local-6989586621679621460"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621460"><span class="hs-identifier hs-var">r</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679621459"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621459"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; OptKind a
forall a. a -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#Opt"><span class="hs-identifier hs-var">Opt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; a
</span><a href="#local-6989586621679621461"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621460"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621459"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-168"></span><span>         </span><span class="annot"><a href="#local-6989586621679621494"><span class="hs-identifier hs-var">long</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ReqArg"><span class="hs-identifier hs-type">ReqArg</span></a></span><span> </span><span id="local-6989586621679621458"><span class="annot"><span class="annottext">String -&gt; a
</span><a href="#local-6989586621679621458"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'='</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679621457"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621457"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679621456"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621456"><span class="hs-identifier hs-var">rest</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; OptKind a
forall a. a -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#Opt"><span class="hs-identifier hs-var">Opt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; a
</span><a href="#local-6989586621679621458"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621457"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621456"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-169"></span><span>         </span><span class="annot"><a href="#local-6989586621679621494"><span class="hs-identifier hs-var">long</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#OptArg"><span class="hs-identifier hs-type">OptArg</span></a></span><span> </span><span id="local-6989586621679621455"><span class="annot"><span class="annottext">Maybe String -&gt; a
</span><a href="#local-6989586621679621455"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>       </span><span id="local-6989586621679621454"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621454"><span class="hs-identifier hs-var">rest</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; OptKind a
forall a. a -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#Opt"><span class="hs-identifier hs-var">Opt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe String -&gt; a
</span><a href="#local-6989586621679621455"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621454"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-170"></span><span>         </span><span class="annot"><a href="#local-6989586621679621494"><span class="hs-identifier hs-var">long</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#OptArg"><span class="hs-identifier hs-type">OptArg</span></a></span><span> </span><span id="local-6989586621679621453"><span class="annot"><span class="annottext">Maybe String -&gt; a
</span><a href="#local-6989586621679621453"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'='</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679621452"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621452"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679621451"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621451"><span class="hs-identifier hs-var">rest</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; OptKind a
forall a. a -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#Opt"><span class="hs-identifier hs-var">Opt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe String -&gt; a
</span><a href="#local-6989586621679621453"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621452"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621451"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span>         </span><span class="annot"><a href="#local-6989586621679621494"><span class="hs-identifier hs-var">long</span></a></span><span> </span><span class="annot"><span class="annottext">[ArgDescr a]
</span><span class="hs-identifier">_</span></span><span>            </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>        </span><span id="local-6989586621679621450"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621450"><span class="hs-identifier hs-var">rest</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; OptKind a
forall a. String -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#UnreqOpt"><span class="hs-identifier hs-var">UnreqOpt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--&quot;</span></span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621497"><span class="hs-identifier hs-var">ls</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621450"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-172"></span><span>
</span><span id="line-173"></span><span class="hs-comment">-- handle short option</span><span>
</span><span id="line-174"></span><span id="local-6989586621679621674"><span class="annot"><a href="Distribution.GetOpt.html#shortOpt"><span class="hs-identifier hs-type">shortOpt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#OptDescr"><span class="hs-identifier hs-type">OptDescr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621674"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.GetOpt.html#OptKind"><span class="hs-identifier hs-type">OptKind</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621674"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span><span>
</span><span id="line-175"></span><span id="shortOpt"><span class="annot"><span class="annottext">shortOpt :: forall a.
Char -&gt; String -&gt; [String] -&gt; [OptDescr a] -&gt; (OptKind a, [String])
</span><a href="Distribution.GetOpt.html#shortOpt"><span class="hs-identifier hs-var hs-var">shortOpt</span></a></span></span><span> </span><span id="local-6989586621679621449"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679621449"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span id="local-6989586621679621448"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621448"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span id="local-6989586621679621447"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621447"><span class="hs-identifier hs-var">rs</span></a></span></span><span> </span><span id="local-6989586621679621446"><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621446"><span class="hs-identifier hs-var">optDescr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ArgDescr a] -&gt; String -&gt; [String] -&gt; (OptKind a, [String])
</span><a href="#local-6989586621679621445"><span class="hs-identifier hs-var">short</span></a></span><span> </span><span class="annot"><span class="annottext">[ArgDescr a]
</span><a href="#local-6989586621679621444"><span class="hs-identifier hs-var">ads</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621448"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621447"><span class="hs-identifier hs-var">rs</span></a></span><span>
</span><span id="line-176"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679621442"><span class="annot"><span class="annottext">options :: [OptDescr a]
</span><a href="#local-6989586621679621442"><span class="hs-identifier hs-var hs-var">options</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">OptDescr a
</span><a href="#local-6989586621679621441"><span class="hs-identifier hs-var">o</span></a></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679621441"><span class="annot"><span class="annottext">o :: OptDescr a
</span><a href="#local-6989586621679621441"><span class="hs-identifier hs-var">o</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span> </span><span id="local-6989586621679621440"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621440"><span class="hs-identifier hs-var">ss</span></a></span></span><span> </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ArgDescr a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621446"><span class="hs-identifier hs-var">optDescr</span></a></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679621439"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679621439"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621440"><span class="hs-identifier hs-var">ss</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679621449"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679621439"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-177"></span><span>        </span><span id="local-6989586621679621444"><span class="annot"><span class="annottext">ads :: [ArgDescr a]
</span><a href="#local-6989586621679621444"><span class="hs-identifier hs-var hs-var">ads</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">ArgDescr a
</span><a href="#local-6989586621679621438"><span class="hs-identifier hs-var">ad</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679621438"><span class="annot"><span class="annottext">ArgDescr a
</span><a href="#local-6989586621679621438"><span class="hs-identifier hs-var">ad</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621442"><span class="hs-identifier hs-var">options</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-178"></span><span>        </span><span id="local-6989586621679621437"><span class="annot"><span class="annottext">optStr :: String
</span><a href="#local-6989586621679621437"><span class="hs-identifier hs-var hs-var">optStr</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="hs-special">[</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679621449"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-179"></span><span>
</span><span id="line-180"></span><span>        </span><span id="local-6989586621679621445"><span class="annot"><span class="annottext">short :: [ArgDescr a] -&gt; String -&gt; [String] -&gt; (OptKind a, [String])
</span><a href="#local-6989586621679621445"><span class="hs-identifier hs-var hs-var">short</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ArgDescr a
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">ArgDescr a
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[ArgDescr a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>        </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679621436"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621436"><span class="hs-identifier hs-var">rest</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[OptDescr a] -&gt; String -&gt; OptKind a
forall a. [OptDescr a] -&gt; String -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#errAmbig"><span class="hs-identifier hs-var">errAmbig</span></a></span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621442"><span class="hs-identifier hs-var">options</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621437"><span class="hs-identifier hs-var">optStr</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621436"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-181"></span><span>        </span><span class="annot"><a href="#local-6989586621679621445"><span class="hs-identifier hs-var">short</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#NoArg"><span class="hs-identifier hs-type">NoArg</span></a></span><span>  </span><span id="local-6989586621679621435"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679621435"><span class="hs-identifier hs-var">a</span></a></span></span><span>  </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[ArgDescr a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621679621434"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621434"><span class="hs-identifier hs-var">rest</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; OptKind a
forall a. a -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#Opt"><span class="hs-identifier hs-var">Opt</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679621435"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621434"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-182"></span><span>        </span><span class="annot"><a href="#local-6989586621679621445"><span class="hs-identifier hs-var">short</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#NoArg"><span class="hs-identifier hs-type">NoArg</span></a></span><span>  </span><span id="local-6989586621679621433"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679621433"><span class="hs-identifier hs-var">a</span></a></span></span><span>  </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[ArgDescr a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679621432"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621432"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span id="local-6989586621679621431"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621431"><span class="hs-identifier hs-var">rest</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; OptKind a
forall a. a -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#Opt"><span class="hs-identifier hs-var">Opt</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679621433"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621432"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621431"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-183"></span><span>        </span><span class="annot"><a href="#local-6989586621679621445"><span class="hs-identifier hs-var">short</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ReqArg"><span class="hs-identifier hs-type">ReqArg</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; a
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679621430"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621430"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[ArgDescr a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String -&gt; OptKind a
forall a. String -&gt; String -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#errReq"><span class="hs-identifier hs-var">errReq</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621430"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621437"><span class="hs-identifier hs-var">optStr</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-184"></span><span>        </span><span class="annot"><a href="#local-6989586621679621445"><span class="hs-identifier hs-var">short</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ReqArg"><span class="hs-identifier hs-type">ReqArg</span></a></span><span> </span><span id="local-6989586621679621429"><span class="annot"><span class="annottext">String -&gt; a
</span><a href="#local-6989586621679621429"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[ArgDescr a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679621428"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621428"><span class="hs-identifier hs-var">r</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679621427"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621427"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; OptKind a
forall a. a -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#Opt"><span class="hs-identifier hs-var">Opt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; a
</span><a href="#local-6989586621679621429"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621428"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621427"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-185"></span><span>        </span><span class="annot"><a href="#local-6989586621679621445"><span class="hs-identifier hs-var">short</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#ReqArg"><span class="hs-identifier hs-type">ReqArg</span></a></span><span> </span><span id="local-6989586621679621426"><span class="annot"><span class="annottext">String -&gt; a
</span><a href="#local-6989586621679621426"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[ArgDescr a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679621425"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621425"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span id="local-6989586621679621424"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621424"><span class="hs-identifier hs-var">rest</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; OptKind a
forall a. a -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#Opt"><span class="hs-identifier hs-var">Opt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; a
</span><a href="#local-6989586621679621426"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621425"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621424"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>        </span><span class="annot"><a href="#local-6989586621679621445"><span class="hs-identifier hs-var">short</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#OptArg"><span class="hs-identifier hs-type">OptArg</span></a></span><span> </span><span id="local-6989586621679621423"><span class="annot"><span class="annottext">Maybe String -&gt; a
</span><a href="#local-6989586621679621423"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[ArgDescr a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621679621422"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621422"><span class="hs-identifier hs-var">rest</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; OptKind a
forall a. a -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#Opt"><span class="hs-identifier hs-var">Opt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe String -&gt; a
</span><a href="#local-6989586621679621423"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621422"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-187"></span><span>        </span><span class="annot"><a href="#local-6989586621679621445"><span class="hs-identifier hs-var">short</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#OptArg"><span class="hs-identifier hs-type">OptArg</span></a></span><span> </span><span id="local-6989586621679621421"><span class="annot"><span class="annottext">Maybe String -&gt; a
</span><a href="#local-6989586621679621421"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[ArgDescr a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679621420"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621420"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span id="local-6989586621679621419"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621419"><span class="hs-identifier hs-var">rest</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; OptKind a
forall a. a -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#Opt"><span class="hs-identifier hs-var">Opt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe String -&gt; a
</span><a href="#local-6989586621679621421"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621420"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621419"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-188"></span><span>        </span><span class="annot"><a href="#local-6989586621679621445"><span class="hs-identifier hs-var">short</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>             </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621679621418"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621418"><span class="hs-identifier hs-var">rest</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; OptKind a
forall a. String -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#UnreqOpt"><span class="hs-identifier hs-var">UnreqOpt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621437"><span class="hs-identifier hs-var">optStr</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621418"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-189"></span><span>        </span><span class="annot"><a href="#local-6989586621679621445"><span class="hs-identifier hs-var">short</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>             </span><span id="local-6989586621679621417"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621417"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span id="local-6989586621679621416"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621416"><span class="hs-identifier hs-var">rest</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; OptKind a
forall a. String -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#UnreqOpt"><span class="hs-identifier hs-var">UnreqOpt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621437"><span class="hs-identifier hs-var">optStr</span></a></span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621417"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679621416"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-190"></span><span>        </span><span class="hs-comment">-- This is different vs upstream = (UnreqOpt optStr,('-':xs):rest)</span><span>
</span><span id="line-191"></span><span>        </span><span class="hs-comment">-- Apparently this was part of the change so that flags that are</span><span>
</span><span id="line-192"></span><span>        </span><span class="hs-comment">-- not recognised as global flags are passed on to the sub-command.</span><span>
</span><span id="line-193"></span><span>        </span><span class="hs-comment">-- But why was no equivalent change required for longOpt? So could</span><span>
</span><span id="line-194"></span><span>        </span><span class="hs-comment">-- this change go upstream?</span><span>
</span><span id="line-195"></span><span>
</span><span id="line-196"></span><span class="hs-comment">-- miscellaneous error formatting</span><span>
</span><span id="line-197"></span><span>
</span><span id="line-198"></span><span id="local-6989586621679621664"><span class="annot"><a href="Distribution.GetOpt.html#errAmbig"><span class="hs-identifier hs-type">errAmbig</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/System.Console.GetOpt.html#OptDescr"><span class="hs-identifier hs-type">OptDescr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621664"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.GetOpt.html#OptKind"><span class="hs-identifier hs-type">OptKind</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621664"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-199"></span><span id="errAmbig"><span class="annot"><span class="annottext">errAmbig :: forall a. [OptDescr a] -&gt; String -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#errAmbig"><span class="hs-identifier hs-var hs-var">errAmbig</span></a></span></span><span> </span><span id="local-6989586621679621415"><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621415"><span class="hs-identifier hs-var">ods</span></a></span></span><span> </span><span id="local-6989586621679621414"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621414"><span class="hs-identifier hs-var">optStr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; OptKind a
forall a. String -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#OptErr"><span class="hs-identifier hs-var">OptErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; [OptDescr a] -&gt; String
forall a. String -&gt; [OptDescr a] -&gt; String
</span><a href="Distribution.GetOpt.html#usageInfo"><span class="hs-identifier hs-var">usageInfo</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621413"><span class="hs-identifier hs-var">header</span></a></span><span> </span><span class="annot"><span class="annottext">[OptDescr a]
</span><a href="#local-6989586621679621415"><span class="hs-identifier hs-var">ods</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-200"></span><span>   </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679621413"><span class="annot"><span class="annottext">header :: String
</span><a href="#local-6989586621679621413"><span class="hs-identifier hs-var hs-var">header</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;option `&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621414"><span class="hs-identifier hs-var">optStr</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;' is ambiguous; could be one of:&quot;</span></span><span>
</span><span id="line-201"></span><span>
</span><span id="line-202"></span><span id="local-6989586621679621663"><span class="annot"><a href="Distribution.GetOpt.html#errReq"><span class="hs-identifier hs-type">errReq</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.GetOpt.html#OptKind"><span class="hs-identifier hs-type">OptKind</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621663"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-203"></span><span id="errReq"><span class="annot"><span class="annottext">errReq :: forall a. String -&gt; String -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#errReq"><span class="hs-identifier hs-var hs-var">errReq</span></a></span></span><span> </span><span id="local-6989586621679621412"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621412"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679621411"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621411"><span class="hs-identifier hs-var">optStr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; OptKind a
forall a. String -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#OptErr"><span class="hs-identifier hs-var">OptErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;option `&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621411"><span class="hs-identifier hs-var">optStr</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;' requires an argument &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621412"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\n&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span class="annot"><a href="Distribution.GetOpt.html#errUnrec"><span class="hs-identifier hs-type">errUnrec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-206"></span><span id="errUnrec"><span class="annot"><span class="annottext">errUnrec :: String -&gt; String
</span><a href="Distribution.GetOpt.html#errUnrec"><span class="hs-identifier hs-var hs-var">errUnrec</span></a></span></span><span> </span><span id="local-6989586621679621410"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621410"><span class="hs-identifier hs-var">optStr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unrecognized option `&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621410"><span class="hs-identifier hs-var">optStr</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;'\n&quot;</span></span><span>
</span><span id="line-207"></span><span>
</span><span id="line-208"></span><span id="local-6989586621679621409"><span class="annot"><a href="Distribution.GetOpt.html#errNoArg"><span class="hs-identifier hs-type">errNoArg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.GetOpt.html#OptKind"><span class="hs-identifier hs-type">OptKind</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679621409"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-209"></span><span id="errNoArg"><span class="annot"><span class="annottext">errNoArg :: forall a. String -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#errNoArg"><span class="hs-identifier hs-var hs-var">errNoArg</span></a></span></span><span> </span><span id="local-6989586621679621408"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621408"><span class="hs-identifier hs-var">optStr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; OptKind a
forall a. String -&gt; OptKind a
</span><a href="Distribution.GetOpt.html#OptErr"><span class="hs-identifier hs-var">OptErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;option `&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679621408"><span class="hs-identifier hs-var">optStr</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;' doesn't allow an argument\n&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-210"></span></pre></body></html>